<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudyStudentBody extends Validate
{
    protected $rule = ['student_id' => 'require|number','height' => 'require|number','weight' => 'require|number','Head_length' => 'require|number','add_time' => 'require|number',
    ];

    protected $message = ['student_id.require' => '班级ID为必填项','student_id.number' => '班级ID需为数字','height.require' => '身高为必填项','height.number' => '身高需为数字','weight.require' => '体重为必填项','weight.number' => '体重需为数字','Head_length.require' => '头围为必填项','Head_length.number' => '头围需为数字','add_time.require' => '发布时间为必填项','add_time.number' => '发布时间需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['student_id','height','weight','Head_length','add_time',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['student_id','height','weight','Head_length','add_time',]);
    }
}
